widget: Add send_focus_change()
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 12 Apr 2010 13:49:21 +0000 (14:49 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 26 Apr 2010 17:59:22 +0000 (18:59 +0100)
commitf04a7203484685e0ed6088927f053133b4079c7c
treec1e256d8bc66bbe4de1b6de073296e9ca7a51193
parent15482528a588bbe97a898786304da6a883122237
widget: Add send_focus_change()

Currently the only users of the GTK_HAS_FOCUS flag are setting it
before sending a focus change event. This is normally needed by
GtkWindow, but there are widgets that require controlling the focus
of widgets that are semantically their children even though they are
parented to another top-level. Case in point: the quick search entry
for GtkTreeView.

Over the years people have been hacking the focus change out of
gtkwindow.c and gtktreeview.c, thus leaking the direct access of the
GTK_HAS_FOCUS flag.

The simplest way to avoid that is to add a function that sends the
focus change event and controls the setting of the flag, thus removing
the need for external widgets to do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=593671
docs/reference/gtk/gtk-sections.txt
gtk/gtk.symbols
gtk/gtkwidget.c
gtk/gtkwidget.h